import request from '@/utils/request'

export function getEnterpriseListAPI(params) {
  return request({
    url: '/park/enterprise',
    params
  })
}

export function getIndustryListAPI() {
  return request({
    url: '/park/industry'
  })
}

// 上传文件
export function uploadAPI(data) {
  return request({
    url: '/upload',
    method: 'POST',
    data
  })
}

export function createEnterpriseAPI(data) {
  return request({
    url: '/park/enterprise',
    method: 'POST',
    data
  })
}

export function editRentAPI(data) {
  return request({
    url: '/park/enterprise',
    method: 'PUT',
    data
  })
}

export function getEnterpriseDetailAPI(id) {
  return request({
    url: `/park/enterprise/${id}`
  })
}

export function delEnterpriseAPI(id) {
  return request({
    url: `/park/enterprise/${id}`,
    method: 'DELETE'
  })
}

export function getRentBuildListAPI() {
  return request({
    url: '/park/rent/building'
  })
}

export function createRentAPI(data) {
  return request({
    url: '/park/enterprise/rent',
    method: 'POST',
    data
  })
}
